package net.zhangbaolin.systemadmin.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.zhangbaolin.systemadmin.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 用户基础表(User)表数据库访问层
 *
 * @author zhangbaolin
 * @since 2023-09-03 12:11:45
 */
@Mapper
public interface UserDao extends BaseMapper<User> {

    //根据用户名获取详细信息
    @Select("select * from user where id = #{id}")
    User getUserByUserId(Long id);

    @Select("select * from user where username = #{username}")
    User getUserByUsername(String username);
}

